import request from "@/http/serve";

const getNavList = (params: any) => request.get<any, any>("/nav", { params });

const addNav = (data: any) => request.post<any, any>("/nav", data);

const delNav = (data: any) => request.delete<any, any>(`/nav/${data.id}`);

const updateNav = (data: any) => request.patch<any, any>(`/nav/${data.id}`, data);

const addNavItem = (data: any) => request.post<any, any>("/nav/navItem", data);

const delNavItem = (data: any) => request.delete<any, any>(`/nav/navItem/${data.id}`);

const updateNavItem = (data: any) => request.patch<any, any>(`/nav/navItem/${data.id}`, data);

export { getNavList, addNav, delNav, updateNav, addNavItem, delNavItem, updateNavItem };
